package com.sinocare.report.controller;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.sinocare.common.entity.vo.Consumer;
import com.sinocare.common.entity.vo.RecordReport;
import com.sinocare.common.result.Result;
import com.sinocare.common.result.ResultCode;
import com.sinocare.report.service.ConsumerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

@CrossOrigin
@RestController
@RequestMapping("/Consumer")
@Api(tags = "报表管理接口")
public class ConsumerController {
    @Resource
    private ConsumerService consumerService;

    //检测记录报表：查询所有
    @ApiOperation(value = "消费者记录报表：查询所有", notes = "检测记录报表：查询所有", httpMethod = "GET")
    @RequestMapping(value = "/consumer", method = RequestMethod.GET)
    public Result findConsumer() throws Exception {
        List<Consumer> list=consumerService.query(null);
        System.out.println(list);
        return Result.ok(ResultCode.SUCCESS, list);
    }

}
